@extends('home.base.person')
@section('content')
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

<title>我的收藏</title>

<link href="{{ asset('AmazeUI-2.4.2/assets/css/admin.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('AmazeUI-2.4.2/assets/css/amazeui.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('css/personal.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('css/colstyle.css') }}" rel="stylesheet" type="text/css">
<div class="user-collection">
	<!--标题 -->
	<div class="am-cf am-padding">
		<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的收藏</strong> / <small>My&nbsp;Collection</small></div>
	</div>
	<hr/>
	<div class="you-like">
		<div class="s-bar">
			我的收藏
			<a class="am-badge am-badge-danger am-round">降价</a>
			<a class="am-badge am-badge-danger am-round">下架</a>
		</div>
		<div class="s-content">			
			@foreach($list as $k => $v)						
			<div class="s-item-wrap">
				<div class="s-item">
					<div class="s-pic">
						<!-- 点击图片，跳转到商品详情页 -->
						<a href="{{ url('/home/introduction').'/'.$v->pid }}" class="s-pic-link">
							<img src="{{ asset('admin/upload').'/'.$v->pic }}" alt="{{ $v->title }}" class="s-pic-img s-guess-item-img">
						</a>
					</div>
					<div class="s-info">
						<div class="s-title"><a href="" title="{{ $v->title }}">{{ $v->title }}</a></div>
						<div class="s-price-box">
							<span class="s-price"><em class="s-price-sign">¥</em><em class="s-value">{{ $v->price }}</em></span>							
						</div>
						<div class="s-extra-box">
							<span class="s-comment">好评: 99.96%</span>
							<span class="s-sales">月销: 266</span>
						</div>
					</div>
					<div class="s-tp">
						<form id="unCollection">
							<a href="javascript:onclick(unCollection())"><span class="ui-btn-loading-before">取消收藏</span></a>
							<i class="am-icon-shopping-cart"></i>
							<!-- <span class="ui-btn-loading-before buy">加入购物车</span> -->
						</form>					
					</div>
					<script type="text/javascript">
						function unCollection(){						
							var myform = document.getElementById('unCollection');
							myform.action = "{{ url('home/unCollection').'/'.$v->id }}";
							myform.method = 'get';
							myform.submit();
						}
					</script>
				</div>
			</div>
			@endforeach
		</div>		
	</div>
</div>				
@endsection